package com.example.test;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;


@Component
public class Sender {

    @Autowired
    private KafkaTemplate kafkaTemplate;

    @Value("${kafka.test.topic}")
    private String topicName;



    public void send(String mag){
        kafkaTemplate.send(topicName,mag);
    }
}
